#include "widget.h"
#include "ui_widget.h"
#include <QRect>
#include <stdlib.h>
#include <time.h>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_yes_pressed()
{
    ui->label->setText("女神，我爱你");
}

void Widget::on_pushButton_no_pressed()
{
    QRect tmp=ui->pushButton_no->geometry();
    ui->pushButton_no->setGeometry(rand()%800,rand()%800,tmp.width(),tmp.height());
    ui->label->setText("女神，不要拒绝我好不好");
}
